var auditofdept = document.getElementById("auditofdept").value;
if (auditofdept == 1) {
    document.getElementById("approval").checked = true;
} else {
    document.getElementById("noApproval").checked = true;
}
$("#approval").click(function(){
    document.getElementById("auditofdept").value=1;
});
$("#noApproval").click(function(){
    document.getElementById("auditofdept").value=2;
});
function auditDeptSure() {
    var auditofdept = $("#auditofdept").val();
    var id = $("#id").val();
    $.ajax({
        url: Feng.ctxPath + "/dept/updateAuditOfDept",
        type: "post",
        data: {
            id: id,
            auditofdept: auditofdept
        },
        success: function (data) {
            Feng.success('操作成功!');
            window.parent.Dept.table.refresh();
            parent.layer.close(parent.layer.getFrameIndex(window.name));
        },
        error: function (data) {
            alert('没有权限，请联系系统管理员!');
            parent.layer.close(parent.layer.getFrameIndex(window.name));
        }
    })
}